from flask.ext.wtf import Form, TextField, PasswordField, BooleanField, RecaptchaField, FieldList
from flask.ext.wtf import Required, Email, EqualTo, SelectField, validators, SubmitField, FormField, DateTimeField

carriers = [('AT&T','AT&T'), ('Verizon', 'Verizon'), ('T-Mobile', 'T-Mobile')]

class LoginForm(Form):
  email = TextField('Email address', [Required(), Email()])
  password = PasswordField('Password', [Required()])
  submit = SubmitField("Login")

class RegisterForm(Form):

  email = TextField('Email address', [validators.Required(), validators.Email()])
  password = PasswordField('Password', [validators.Required()])
  name = TextField("Full name")
  submit = SubmitField("Register")

class PlaceOrderForm(Form):
  menu_item_id = TextField("Menuitem ID")
  quantity = TextField("Quantity", default='1')
  submit = SubmitField("Place Order")

class AddMenuItemForm(Form):
  food_name = TextField("Food Name")
  max_quantities = TextField("Max Quantities")
  submit = SubmitField("+")

class AddExistingFoodToMenu(Form):
  food_id = TextField("Food ID")
  quantities = TextField("Quantities")
  submit = SubmitField("Add to menu")

class RemoveMenuItemForm(Form):
  food_id = TextField("Menuitem ID")
  submit = SubmitField("x");

class ChangePreferencesForm(Form):

  email = TextField('Change Email address', [validators.Email()])
  password = PasswordField('Change Password')

  carrier = SelectField(choices=carriers)
  phone = TextField('Phone Number')

  submit = SubmitField("Submit Changes")


